package com.zmj.sy.mom.srv.aps.feign;

import com.zmj.sy.mom.srv.aps.bean.vo.nest.*;
import com.zmj.sy.mom.srv.aps.bean.vo.nest.release.NestReleasePartReqVo;
import com.zmj.sy.mom.srv.aps.bean.vo.nest.release.NestReleasePlateReqVo;
import com.zmj.sy.mom.srv.aps.bean.vo.nest.workspace.WorkSpaceCreateReqVo;
import com.zmj.sy.mom.srv.aps.bean.vo.nestpre.LantekPreDrawReqVo;
import feign.Request;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(url = "${project.feign.ltk-pro-url}", name = "lantekProApiClient")
public interface LantekProApiClient {

    /**
     * 正式套料：推送图纸信息
     */
    @PostMapping("/0114/BasePart/RegisterOrUpdate")
    NestLanCommonsResVo registerOrUpdate(@RequestBody LantekPreDrawReqVo reqVo, @RequestHeader("Authorization") String token);

    /**
     * 正式套料：推送计划信息
     */
    @PostMapping("/0114/ManufacturingOrder/ClientNesting")
    NestLanCommonsResVo clientNesting(@RequestBody LantekProPushReqVo reqVo, @RequestHeader("Authorization") String token, Request.Options options);

    /**
     * 正式套料：推送钢板信息
     */
    @PostMapping("/0114/SteelPlate/ImportAPSIntegratedInventory")
    NestLanCommonsResVo importAPSIntegratedInventory(@RequestBody NestPlatePushReqVo reqVo, @RequestHeader("Authorization") String token);

    /**
     * 正式套料：打开指定套料作业区和套料图
     */
    @PostMapping("/0114/ManufacturingOrder/OpenNesting")
    NestLanCommonsResVo openNesting(@RequestBody LantekProOpenReqVo reqVo, @RequestHeader("Authorization") String token);

    /**
     * 正式套料：零件释放
     */
    @PostMapping("/0114/ManufacturingOrder/Release")
    NestLanPaReleaseResVo release(@RequestBody NestReleasePartReqVo reqVo, @RequestHeader("Authorization") String token);

    /**
     * 正式套料：钢板释放
     */
    @PostMapping("/0114/SteelPlate/ReleaseAPSIntegratedInventory")
    NestLanPlReleaseResVo releaseAPSIntegratedInventory(@RequestBody NestReleasePlateReqVo reqVo, @RequestHeader("Authorization") String token);

    /**
     * 正式套料：创建作业区
     */
    @PostMapping("/0114/ManufacturingOrder/jobCreate")
    NestLanCommonsResVo jobCreate(@RequestBody WorkSpaceCreateReqVo reqVo, @RequestHeader("Authorization") String token);

}
